package com.greatchn.authorization_server.web.dao;

import com.greatchn.authorization_server.web.po.OauthRoleGroupInfo;
import com.greatchn.authorization_server.web.po.OauthRoleGroupInfoPK;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @IOauthRoleGroupInfoDao: OauthRoleGroupInfo dao
 * @author: ZBoHang
 * @time: 2023/2/28 9:17
 */
@Repository
public interface IOauthRoleGroupInfoDao extends JpaRepository<OauthRoleGroupInfo, OauthRoleGroupInfoPK>, JpaSpecificationExecutor<OauthRoleGroupInfo> {

    /**
     * find by role group id in
     */
    public List<OauthRoleGroupInfo> findByRoleGroupIdIn(List<Integer> list);

    /**
     * find by user group id in
     */
    public List<OauthRoleGroupInfo> findByBelongToUserGroupIdIn(List<Integer> list);
}
